#pragma once
#include <QAbstractScrollArea>

class Scene;

class SceneView : public QAbstractScrollArea
{
public:
	enum TOOL { T_MOVE, T_MOVEVIEW, T_SCALEVIEW };
private:
	Scene* m_pScene;
	TOOL m_CurrentTool;
public:
	SceneView(QWidget* parent, Scene* scene);
	~SceneView(void);
	void resetScene(Scene* scene) { m_pScene = scene; update(); }
	
	TOOL currentTool() { return m_CurrentTool; }
	void setCurrentTool(TOOL tool);
protected:
	void paintEvent(QPaintEvent* );

	void mousePressEvent(QMouseEvent* event);
	void mouseMoveEvent(QMouseEvent* event);
	void mouseReleaseEvent(QMouseEvent* event);
	void keyPressEvent(QKeyEvent* event);
	void keyReleaseEvent(QKeyEvent* event);
};
